USMT custom .xml file
When creating my task sequence and specifiing a custom.xml file that I createdwhere do I put it that so that the USMT can read it? When creatign the task sequence I am not allowed to specify a file or UNC path just a name.
February 11th, 2009 12:20am
Just put it in your USMT source folder, and update your DP.MichaelDeploy deploy deploy
Free Windows Admin Tool Kit Click here and download it now
February 11th, 2009 8:57am
Hi, I recently encountered an issue, where I needed to specify a custom xml file for excluding something in the scanstate process during an OS Deployment and I found that the best way to do this is to put the file in the root of the USMT Pacakge, and update
the DP, then add that custom xml to the Capture step in the Task Sequence, I was having trouble getting this to work until I did the following:
So to sum this up, to use a custom.xml for excluding something in a ConfigMgr 2007 Task Sequence Capture Step, do the following:
1. Makes sure your custom.xml file is copied to the USMT Package source folder (in the root is easiest) and update the Distribtution Points on which it is located.
2. Add the following Task Sequence Variable Step to the Task Sequence right before the Capture User Settings step: OSDMigrateAdditionalCaptureOptions
With a value of the following:
/i:"%SYSTEMDRIVE%\_SMSTaskSequence\Packages\ABC00008\Custom.xml"
Where ABC00008 is your actual USMT package ID, and custom.xml is your custom xml file for exluding or including scanstate actions.
The Symptoms you may see when this does not work as expected:
After adding your custom xml to the USMT Package and updating the DP, you may have just added the additional command to the Task Sequence Variable before the Capture Users Settings step as follows:
OSDMigrateAdditionalCaptureOptions
/i:custom.xml
I tried this however, it was not finding the file in the USMT package.
It seems that this is a pathing issue, the scanstate.log it errors with cannot find file, the Task Sequence errors with the generic 80004005 which unspecifed error.
When I used /i:custom.xml I thought it should look in the directory where the USMT package files were located, however, this was not working for me in my LAB, all the other entries it is showing in the command line look like this /i:"C:\_SMSTaskSequence\Packages\ABC00008\amd64\miguser.xml"
etc...
then at the end it has /i:customexclude.xml and it is failing with script file not found, and this XML is definately in the package folder source and on the DP.
Looking in the scanstate.log before the Task Sequence Exists, it seems to be looking for it in the c:\windows\system32 folder so based on the scanstate log entries, I think we just need to specify the path somehow, so in looking at this for possible variables
we could use, so we can help ensure this would work in the most scenarios/environments, for example, if the system drive was not C:\, or if a client is x86 versus x64, here is what I came up with:
Once you have the custom.xml on the package souce and DP, I recommend putting it in the root of the USMT package source folder, then use the following as the OSDMigrateAdditionalCaptureOptions variable:
Use the the %SYSTEMDRIVE% variable and path to the package folder where the file exists:
/i:"%SYSTEMDRIVE%\_SMSTaskSequence\Packages\ABC00008\Custom.xml"
I think putting it in the root of the USMT package and not having to specify the amd64 or x86 in the path works better, so you can do this once, for either platform architecture, regardless of whether the System Drive is C:\ or not... then the only thing
really hard coded is the package ID, and the other stuff will be generic enough it should work...
I also ran into a conflict with a URLID of my custom.xml was the same as one of the default XML, my template I copied from the technet article was set to miguser on the URLID, so look out for this, the samples on TechNet have the same URLID as the built
in files we are using, so if you are just wanting to add to the default stuff, this needs to be unique.
I just changed it to be customExclude as follows in the beginning of the xml folder as follows:
<?xml version="1.0" encoding="UTF-8"?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/customExclude">
More information:
This blog post has some details on using unconditionalExclude
http://blogs.technet.com/b/askds/archive/2010/03/03/usmt-4-0-and-custom-exclusion-troubleshooting.aspx
This TechNet Article has samples of how to exclude various things in a custom.xml:
http://technet.microsoft.com/en-us/library/dd560762(WS.10).aspx
So next I would probably test this using hardlinks which should work I guess, and I will be blogging on the specific case topic and also reply on other posts regarding machine certificates not working for native mode clients in a refresh scenario
which is what led me down this path in the first place.
Cliff Hughes (MSFT)
April 16th, 2011 9:53am
Hi, I recently encountered an issue, where I needed to specify a custom xml file for excluding something in the scanstate process during an OS Deployment and I foudn that the best way to do this is to put the file in the root of the USMT Pacakge, and update
the DP, then when you want to add that to the step in the Task Sequence, I was having trouble getting this to work until I did the following:
After adding your custom xml to the USMT Package and updating the DP, add a Task Sequence Variable before the Capture Users Settings step as follows:
OSDMigrateAdditionalCaptureOptions
/i:custom.xml
I tried this however, it was not finding the file in the USMT package.
It seems that this is a pathing issue
When we use /i:filename I thought it should look in the directory where the USMT package is, however, its not working for me in my LAB, all the other entries it is plugging into the command line look like this /i:"C:\_SMSTaskSequence\Packages\ABC00008\amd64\,,,,xml"
then at the end it has /i:customexclude.xml and it is failing with file not found or some sort of path error, and this XML is definately in the package folder on the DP. I checked...
Looking in the scanstate.log before the Task Sequence Exists, it seems to be looking for it in the c:\windows\system32 folder
based on the scanstate log entry, I see we need to specify the path somehow, so in looking at this for variables we could use, so as not to have something that would fail on some machines, if they had the OS installed on a different drive, or if a client is
x86 versus amd64, here is what I came up with:
Use the the SYSTEMDRIVE variable and path to the package folder where the file exists:
/i:"%SYSTEMDRIVE%\_SMSTaskSequence\Packages\ABC00008\Custom.xml"
I think putting it in the root of the USMT package and not having to specify the amd64 or x86 may work better, and it did, so I am thinking we can make this less archictecture specific, or OS install path specific, then the only thing really hard coded is
the package ID,
and the other stuff will be generic enough it should work...
I got further, now I have a conflict with a URLID in one of the default XML, my template I copied from the technet article was set to miguser on the URLID
I just changed it to be customExclude as follows in the beginning of the xml folder as follows:
<?xml version="1.0" encoding="UTF-8"?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/customExclude">
I am putting customExlude.xml the root and changing the path so I dont have to use the amd64, or x86 in the path.
Updating the DP's now, and we just got past the errors I was seeing...
So next I would probably test using hardlinks, and I will be blogging on the specific case topic on reply on other posts regarding machine certificates not working for native mode clients in a refresh scenarion.Cliff Hughes (MSFT)
Free Windows Admin Tool Kit Click here and download it now
April 16th, 2011 9:55am